#pragma once

class GLSLProgram
{
public:
	GLSLProgram(const std::string& filename);
	~GLSLProgram();

	void			Bind();
	static void		Unbind();

	unsigned int	GetHandle() const;

private:
	unsigned int	m_programHandle;
	unsigned int	m_vertHandle;
	unsigned int	m_fragHandle;

	std::string LoadTextFile(const std::string& ext);
	void		CompileShader(const std::string& src, unsigned int& handle, GLenum type);
	void		LinkProgram();

	const std::string m_filename;
};

